import { get } from "../util/request";

// 获取商品列表
export const reqProducts = () => get("/api/v1/products");

// 根据id获取详情
export const reqProductsDetail = (id) => get("/api/v1/products/" + id);

//获取商品分类列表
export const FenLei = () => get("/api/v1/product_categories");
//根据分类获取分类对应的列表
// /api/v1/products?name='口红'(name指的是关键字)
export const FenLeiById = (data) => get(`/api/v1/products?name=${data}`);
